package zjitc.service.Impl;

import zjitc.dao.AdminMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import zjitc.po.Admin;
import zjitc.service.AdminService;

/**
 * Create by IntelliJ IDEA
 *
 * @author: jsonor
 * @date-Time: 2018/4/12 16:53
 * @description:
 */
@Service
public class AdminServiceImpl implements AdminService {
@Autowired
private AdminMapper adminMapper;
    @Override
    public Admin login(String username, String password) {
        return adminMapper.login(username,password);
    }

    @Override
    public int addAdmin(Admin admin) {
        return adminMapper.addAdmin(admin);
    }

  @Override
  public Admin findByCode(String code) {
    return adminMapper.findByCode(code);
  }

  @Override
  public int update(Admin admin) {
    return adminMapper.update(admin);
  }

    @Override
    public Admin findByUsername(String username) {
        return adminMapper.findByUsername(username);
    }
}
